package com.zxy.lm.service;

import com.zxy.lm.DO.BorrowRecordDO;
import com.zxy.lm.entity.BorrowRecord;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jiusi
 * @since 2021-06-22
 */
public interface BorrowRecordService extends IService<BorrowRecord> {

    boolean selectExistenceNotReturned(Integer userId);

    List<BorrowRecord> getAllRecordByUserId(Integer userId);

    List<BorrowRecordDO> getAllRecordDOByUserId(Integer userId);

//    boolean borrow(Integer userId, Integer bookId, Integer days);

//    boolean returnBook(Integer recordId, Integer userID);

    boolean addBorrowRecord(String username, Integer bookId, Integer days, Integer adminId);

    boolean returnBook(Integer recordId);

    String getRecordUsernameById(Integer recordId);

}
